Skip to content

fix(quality): the E2E front-controller gate blocked every app without an index route - #145

Merged
rubenvdlinde merged 1 commit into
mainfrom
ci/front-controller-gate-app-independent
Aug 4, 2026
Merged

fix(quality): the E2E front-controller gate blocked every app without an index route#145
rubenvdlinde merged 1 commit into
mainfrom
ci/front-controller-gate-app-independent

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

What was wrong

The Playwright job's pre-flight proved the php -S front controller was routing by requesting /apps/<app-name>/ and hard-failing on 404. That conflates two independent properties:

  1. does the front controller route pretty URLs — a CI concern, and
  2. does THIS app have an index route — an app design choice.

A settings-only app has no / route and no navigation entry, so /apps/<app>/ is a correct Nextcloud 404. The gate read that as a broken router, exited 1 before a single spec ran, and printed an error naming php -S.

ConductionNL/nldesign#206 hit exactly this: 31 specs that navigate to /settings/admin/theming never executed, and the failure text pointed at the wrong thing.

Evidence the two are separable

On that same PR, run 30859016722 (job 91836768845), the identical URL returned HTTP 500, not 404 — index.php had executed and thrown on a missing cross-app class. Same router, same request, different status. A 404 from /apps/<app>/ is therefore Nextcloud answering "no such route", not php -S answering "no such directory index".

The fix

Probe /apps/files/ instead. php -S 404s a path that resolves to a real directory with no index.php inside it — that is the entire failure mode the router exists to fix. apps/files is shipped, always enabled, has no index.php, and its route always resolves (302 to /login unauthenticated, never 404).

Measured on a fixture with and without the router. Note that the obvious alternatives are dead probes — a router-less php -S already serves them from the root index.php, so they would pass while the router was missing:

probe no router with router discriminates?
/apps/files/ 404 200
/apps/<app>/ 404 200 ✅ but a 404 is also legitimate
/login 200 200 ❌ dead probe
/nonexistent/ 200 200 ❌ dead probe

/apps/<app-name>/ is still requested and its status still printed — as a ::notice:: rather than a gate. A page app that lost its route and a settings-only app that never had one look identical from here, and only the spec run can tell them apart.

Not done

  • No assertion weakened, no test skipped, no timeout raised, no allow-list widened. The OCS entry-point gate immediately below is untouched.

… an index route

The Playwright job proved the `php -S` front controller was routing by
requesting `/apps/<app-name>/` and failing on 404. That conflated two
independent properties:

  1. does the front controller route pretty URLs — a CI concern, and
  2. does THIS app have an index route — an app design choice.

A settings-only app has no `/` route and no navigation entry, so
`/apps/<app>/` is a correct Nextcloud 404. The gate read that as a broken
router, exited 1 before a single spec ran, and printed an error naming the
router. nldesign#206 hit exactly this: 31 specs that navigate to
`/settings/admin/theming` never executed, and the failure text pointed at
`php -S`.

That the two are separable is measurable on that PR: on run 30859016722
(job 91836768845) the same URL returned **500**, not 404 — index.php had
executed and thrown on a missing cross-app class. Same router, same
request, different status. So a 404 there is Nextcloud saying "no such
route", not `php -S` saying "no such directory index".

The probe now uses `/apps/files/`, which is the right shape for what is
being proven. `php -S` 404s a path resolving to a real directory with no
index.php inside it; that is the entire failure mode the router exists to
fix. `apps/files` is shipped, always enabled, has no index.php, and its
route always resolves (302 to /login unauthenticated).

Measured on a fixture with and without the router — note that the obvious
alternatives are DEAD probes, because a router-less `php -S` already
serves them from the root index.php:

                      no router    with router
    /apps/files/          404          200      <- discriminates
    /apps/<app>/          404          200      <- discriminates, but 404
                                                   is also legitimate
    /login                200          200      <- proves nothing
    /nonexistent/         200          200      <- proves nothing

`/apps/<app-name>/` is still requested and its status still printed, as a
`::notice::` rather than a gate — a page app that lost its route and a
settings-only app that never had one look identical from here, and only
the spec run can tell them apart.
@rubenvdlinde
rubenvdlinde merged commit bb9d458 into main Aug 4, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant